<div class="layui-fluid" id="VIEW-list-table" >
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body nepadmin-table-full">
                    <div class="layui-btn-container nepadmin-pad-t10 nepadmin-pad-l10">
                        <a class="layui-btn layui-btn-sm" lay-perms="sys:user:save" onclick="layui.admin.tableSearch('','logListId')">刷新</a>
                    </div>
                    <table id="logListId" lay-filter="logList"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var LogList = function (layui,jobId) {
        var admin = layui.admin, table = layui.table, form = layui.form, $ =layui.jquery;
        //初始化列表
        this.init = function () {
            form.render();
            admin.table({
                elem: '#logListId',
                api: 'pageScheduleLogList',
                height: 'full-200',
                tableFilter:'logList',
                size:'sm',
                page: false,
                where:{jobId:jobId},
                limit: 20,
                cols: [[
                    {title: 'logId', field: 'logId', align:'center', width: 70},
                    {title: 'bean名称', field: 'beanName', width: 200, align:'center'},
                    {title: '请求参数', field: 'params', width: 200, align:'center'},
                    {title: '状态', field: 'status', width: 90, align:'center',
                        templet:function (d) {
                            if(d.status == 0){
                                return '<span class="layui-badge layui-bg-blue">成功</span>';
                            }else{
                                return '<span class="layui-badge layui-bg-red">失败</span>';
                            }
                        }},
                    {title: '耗时(单位：毫秒)', field: 'times', width: 150, align:'center'},
                    {title: '失败信息', field: 'error', align:'center'},
                    {field: 'createTime',title: '操作时间',align: 'center'}
                ]]
            });
        };
    };
</script>